package com.heima.admin.service.impl;

import com.heima.admin.service.AdSensitiveService;
import com.heima.apis.sensitive.ISensitiveClient;
import com.heima.model.admin.dtos.SensitiveDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmSensitive;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: ljl
 * @Date: 2022/11/16/22:57
 * @Description:
 */
@Slf4j
@Service
public class AdSensitiveServiceImpl implements AdSensitiveService{
    @Autowired
    private ISensitiveClient iSensitiveClient;


    /**
     * 敏感词查询
     * @param sensitiveDto
     * @return
     */
    @Override
    public PageResponseResult wmSensitiveList(SensitiveDto sensitiveDto) {
        PageResponseResult result = iSensitiveClient.wmSensitiveList(sensitiveDto);
         return result;
    }

    /**
     * 根据id删除敏感词
     * @param id
     * @return
     */
    @Override
    public ResponseResult wmSensitiveDeleteById(Integer id) {
        return iSensitiveClient.wmSensitiveDeleteById(id);
    }

    /**
     * 添加敏感词
     * @param wmSensitive
     * @return
     */
    @Override
    public ResponseResult wmSensitiveSave(WmSensitive wmSensitive) {
        return iSensitiveClient.wmSensitiveSave(wmSensitive);
    }

    /**
     * 更新敏感词
     * @param wmSensitive
     * @return
     */
    @Override
    public ResponseResult wmSensitiveUpdate(WmSensitive wmSensitive) {
        return iSensitiveClient.wmSensitiveUpdate(wmSensitive);
    }
}
